import { formatTime } from '@/utils'

export const listColumns = [
  { title18: 'hangManage.scheduledNo', dataIndex: 'scheduleBillNo', key: 'scheduleBillNo', align: 'center', width: 150,fixed: 'left' },
  { title18: 'common.state', dataIndex: 'status', key: 'status', align: 'center', width: 100 },
  { title18: 'hangManage.taskNumber', dataIndex: 'produceQty', key: 'produceQty', align: 'right', width: 120 },
  { title18: 'other.doneNo', dataIndex: 'finishedQty', key: 'finishedQty', align: 'right', width: 120 },
  { title18: 'other.undoneNo', dataIndex: 'unfinishedQty', key: 'unfinishedQty', align: 'right', width: 120 },
  { title18: 'common.unit', dataIndex: 'unit', key: 'unit', align: 'center', width: 120 },
  { title18: 'hangManage.makeNo', dataIndex: 'moNo', key: 'moNo', align: 'center', width: 120 },
  { title18: 'basicData.styleNo', dataIndex: 'styleNo', key: 'styleNo', align: 'center', width: 120 },
  { title18: 'basicData.productType', dataIndex: 'productType', key: 'productType', align: 'center', width: 120 },
  { title18: 'hangManage.poNo', dataIndex: 'poNo', key: 'poNo', align: 'center', width: 120 },
  { title18: 'basicData.color', dataIndex: 'color', key: 'color', align: 'center', width: 120 },
  { title18: 'basicData.size', dataIndex: 'size', key: 'size', align: 'center', width: 120 },
  { title18: 'hangManage.road', dataIndex: 'roadMapName', key: 'roadMapName', align: 'center', width: 120 },
  { title18: 'hangManage.hangerStations', dataIndex: 'stationList', key: 'stationList', align: 'center', width: 120,
    customRender: ({ text }) => {
      return text && text.map(i=> i.stationNo).join()
    }
  },
  { title18: 'hangManage.lineDate', dataIndex: 'produceOnlineTime', key: 'produceOnlineTime', align: 'center', width: 120, timeType: 'day',
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD')
    }
  },
  {
    title18: 'hangManage.completeDate', dataIndex: 'realFinishTime', key: 'realFinishTime', align: 'center', width: 120, timeType: 'day',
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD')
    }
  },
  { title18: 'common.operate', dataIndex: 'operate', key: 'operate', align: 'center', width: 120, fixed: 'right' }
]
